home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / hoobie / irix-netprint.txt < prev    next >
Encoding:
Text File  |  2001-11-06  |  757 b   |  19 lines

  1.  
  2. The actual vulnerability is quite ugly.  netprint has system("disable")
  3. call, i.e. it calls a program without specifying absolute path.  At the
  4. moment the call is made, uid=lp.  So lp priorities can be trivially
  5. obtained.
  6.  
  7. /usr/lib/print/netprint -n blah -h blah -p blah 1-234
  8.  
  9. and whatever program named  disable  is first in the PATH will be executed
  10. as lp.
  11.  
  12. However, one can go further if BSD printing subsystem is installed.
  13. /usr/spool/lpd is owned by lp, and it's the place where lpd writes lock
  14. file.  lpd is also root/suid.  So one replaces
  15. /usr/spool/lpd/lpd.lock with a symlink to /etc/passwd and runs lpd, passwd
  16. gets nuked.  Then one repeats netprint trick, and, voila, disable now runs
  17. as root, because lp is not found in passwd.  Kinda neat.
  18.  
  19.